<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('工单直接答复')"/>
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/qxEasyUI/themes/default/easyui.css}">
</head>
<style>
    .bootstrap-tagsinput > input {
        display: none;
    }
</style>

<body style="background-color: #F4F6FA">
<div  class="main-content" th:object="${workFormBase}" style="margin: 0;padding: 0">
    <form id="form-user-add" class="form-horizontal" style="background-color: #F4F6FA">
        <input name="pkId" th:value="*{pkId}" type="hidden">
        <input type="hidden" name="crtStepId" id="txtCrtStepId">
        <input type="hidden" name="crtStepName" id="txtCrtStepName">
        <div class="col-sm-12" style="display: flex">
            <!--     左       -->
            <div class="col-sm-6 entering-page">
                <!--   来电基本信息     -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">来电及工单信息</h4>
                </div>
                <!--事发地址-->
                <div class="col-sm-12 entering-mt">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label is-required entering-pd">地区：</label>
                        <div class="col-sm-8">
                            <select name="fmAreaNo" th:field="*{fmAreaNo}" id="fmAreaNo" onchange="dropChgSendTextOnly(this,'fmAreaName');"
                                    th:with="district=${@commonServiceImpl.findArea()}" class="form-control formSelect" required>
                                <option value="">--请选择--</option>
                                <option th:each="item : ${district}" th:text="${item['CSText']}"
                                        th:value="${item['CSValue']}"></option>
                            </select>
                            <input type="hidden" id="fmAreaName" name="fmAreaName"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">地址：</label>
                        <div class="col-sm-8">
                            <input name="fmAddress" th:field="*{fmAddress}"
                                   class="form-control scene theAddress" type="text">
                        </div>
                    </div>
                </div>
                <!-- 来电类型,内容类别..-->
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label  entering-pd">来电人：</label>
                        <div class="col-sm-8">
                            <input id="fromName" name="fromName" th:field="*{fromName}" class="form-control scene " type="text">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">性别：</label>
                        <div class="col-sm-8">
                            <label class="check-box">
                                <input name="fromSex" th:field="*{fromSex}" type="radio" value="1" >男
                            </label>
                            <label class="check-box">
                                <input name="fromSex" th:field="*{fromSex}"  type="radio" value="0" >女
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12 entering-mt">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">联系电话：</label>
                        <div class="col-sm-8">
                            <input name="fromTelA" th:field="*{fromTelA}"
                                   class="form-control scene " type="text">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <div class="col-sm-8">
                            <input name="fromTelB" th:field="*{fromTelB}"
                                   class="form-control scene " type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">电子邮件：</label>
                        <div class="col-sm-8">
                            <input id="wsCode" name="fmEmail" th:field="*{fmEmail}" class="form-control serial" type="text">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">证件类型：</label>
                        <div class="col-sm-8">
                            <select id="fmCerNO" th:field="*{fmCerName}" name="fmCerName" onchange="dropChgSendTextOnly(this,'fmCerName');"
                                    th:with="cerTypes=${@commonServiceImpl.findCerType()}" class="form-control formSelect">
                                <option value="">--请选择--</option>
                                <option th:each="item : ${cerTypes}" th:text="${item['CSText']}"
                                        th:value="${item['CSText']}"></option>
                            </select>
                        </div>
                    </div>
                </div>

                <!--备注坐席-->
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">证件号码：</label>
                        <div class="col-sm-8">
                            <input name="fmCerNo" th:field="*{fmCerNo}"
                                   class="form-control code"
                                   type="text">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">同意公开：</label>
                        <div class="col-sm-8">
                            <label class="check-box">
                                <input name="openFrom" th:checked="*{openFrom ==1}" type="radio" value="1" >是
                            </label>
                            <label class="check-box">
                                <input name="openFrom" th:checked="*{openFrom ==0}" type="radio" value="0" >否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">提交时间：</label>
                        <div class="col-sm-8">
                            <input name="iptTime" th:field="*{iptTime}"
                                   class="form-control code" disabled
                                   type="text">
                        </div>
                    </div>

                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd is-required">来电类别：</label>
                        <div class="col-sm-8">
                            <select name="dfmClaNo" id="dfmClaNo"
                                    th:with="telTypes=${@commonServiceImpl.findTelType()}"
                                    onchange="dropChgSendTextOnly(this,'dFmClaName');"
                                    class="form-control formSelect" required>
                                <option value="">--请选择--</option>
                                <th:block th:each="item : ${telTypes}">
                                    <option th:text="${item['CSText']}" th:value="${item['CSValue']}"
                                            th:selected="${item['CSValue'] == workFormBase.dfmClaNo}"></option>
                                </th:block>
                            </select>
                            <input type="hidden" name="dfmClaName"  id="dFmClaName"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">内容类别：</label>
                        <div class="col-sm-8">
                            <input id="qxCT" th:value="*{dcntAname}" style="width:180px;height:31px;">
                            <input id="txtDcntAcode" name="dcntAcode" type="hidden" th:value="*{dcntAcode}"/>
                            <input id="txtDCntAName" name="dcntAname" type="hidden" th:value="*{dcntAname}"/>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">流水号：</label>
                        <div class="col-sm-8">
                            <input name="wsCode"th:field="*{wsCode}"
                                   class="form-control code"
                                   type="text" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">提取码：</label>
                        <div class="col-sm-8">
                            <input name="wsKey" th:field="*{wsKey}"
                                   class="form-control code"
                                   type="text" disabled>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12" style="margin: 8px 0 8px 0;">
                    <div class="form-group">
                        <label class="col-xs-2 control-label entering-pd">通话内容：</label>
                        <div class="col-xs-9">
                                <textarea name="fmContent"  th:field="*{fmContent}" maxlength="3500"
                                          class="form-control workRemark"
                                          rows="3" style="height: 100px"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <!--     右       -->
            <div class="col-sm-6 entering-page">
                <div class="col-sm-12">
                    <!--   工单基本信息     -->
                    <div class="col-sm-12 tltieBoder">
                        <div class="blueBorder"></div>
                        <h4 style="margin:0 0 0 10px">工单基本信息</h4>
                    </div>
                    <!--工单主题,工单编号,工单性质...-->
                    <div class="col-sm-12">
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">工单主题：</label>
                            <div class="col-sm-8">
                                <input id="wsTopic" name="wsTopic" th:field="*{wsTopic}"
                                       class="form-control code"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">工单编号：</label>
                            <div class="col-sm-8">
                                <input name="workFormNo" th:field="*{workFormNo}"
                                       class="form-control code"
                                       type="text">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd is-required">工单性质：</label>
                            <div class="col-sm-8">
                                <select name="setProId"  id="setProId"
                                        th:with="workFormTypes=${@commonServiceImpl.findWorkFormType()}"
                                        onchange="dropChgSendTextOnly(this,'setProName');"
                                        class="form-control m-b phoneCategory required">
                                    <option value="">--请选择--</option>
                                    <th:block th:each="item : ${workFormTypes}">
                                        <option th:text="${item['CSText']}" th:value="${item['CSValue']}"
                                                th:selected="${item['CSValue']} == *{setProId}"></option>
                                    </th:block>
                                </select>
                                <input name="setProName" type="hidden" id="setProName">
                            </div>
                        </div>
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">拟办期限：</label>
                            <div class="col-sm-8">
                                <input name="wfLimit" th:value="${#dates.format(workFormBase.wfLimit,'yyyy-MM-dd HH:mm:ss')}"
                                       class="form-control code"
                                       type="text">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">建议公开：</label>
                            <div class="col-sm-8">
                                <label class="check-box">
                                    <input name="openX" th:checked="*{openX ==1}" type="radio" value="1" >是
                                </label>
                                <label class="check-box">
                                    <input name="openX" th:checked="*{openX ==0}"  type="radio" value="0" >否
                                </label>
                            </div>
                        </div>
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">摘报：</label>
                            <div class="col-sm-8">
                                <label class="check-box">
                                    <input name="reportFlag" th:checked="*{reportFlag ==1}" type="radio" value="1" >是
                                </label>
                                <label class="check-box">
                                    <input name="reportFlag" th:checked="*{reportFlag ==0}"  type="radio" value="0" >否
                                </label>
                            </div>
                        </div>
                    </div>
                    <!-- 工单备注-->
                    <div class="col-sm-12" style="margin: 8px 0 8px 0;">
                        <div class="form-group">
                            <label class="col-xs-2 control-label entering-pd">回复意见：</label>
                            <div class="col-xs-9">
                                <textarea name="doverDesc" maxlength="3500"
                                          class="form-control workRemark"
                                          rows="3" style="height: 100px"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label entering-pd">工单备注：</label>
                            <div class="col-sm-9">
                                <input name="wfRemark" placeholder="请输入"
                                       class="form-control workTheme" type="text">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">创建人：</label>
                            <div class="col-sm-8">
                                <input name="iptWorker" th:value="*{iptWorker}"
                                       class="form-control code"
                                       type="text">
                                <input name="iptWorkNo" type="hidden" th:value="*{iptWorkNo}">
                            </div>
                        </div>
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">创建时间：</label>
                            <div class="col-sm-8">
                                <input name="crtStepTime" th:value="${#dates.format(workFormBase.crtStepTime,'yyyy-MM-dd HH:mm:ss')}"
                                       class="form-control code"
                                       type="text">
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!--按钮-->
        <div class="col-sm-12 entering-bt" style="justify-content: center;">
            <button type="button" class="btn btn-sm btn-info" onclick="btnSbmtClick()">提交
            </button>&nbsp;
        </div>
    </form>
</div>

<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/qxEasyUI/jquery.easyui.min.js}"></script>

<script>
    var prefix= ctx+"system/mTelWF";
    function btnSbmtClick() {
        $("#txtCrtStepId").val("960");//强制结束-直接归档
        $("#txtCrtStepName").val("强制结束");
        if ($.validate.form()) {
            let data = $('#form-user-add').serializeArray();
            $.operate.saveTab(prefix+ "/rManage/tWFormOverJson", data);
        }
    }
    $('#qxCT').combotree({
        url: '/system/common/findContentCate',
        required: false,
        onSelect: function (record) {
            $("#txtDcntAcode").val(record.id);
            $("#txtDCntAName").val(record.text);
            var dfmClaName = $("#dfmClaNo option:selected").text();
            var fromName = $("#fromName").val();
            $("#wsTopic").val(fromName + '[' + dfmClaName + ']' + record.text);
        }
    });
    $('#dfmClaNo').change(function () {
        var dfmClaName = $("#dfmClaNo option:selected").text();
        var txtDCntAName = $("#txtDCntAName").val();
        var fromName = $("#fromName").val();
        $("#wsTopic").val(fromName + '[' + dfmClaName + ']' + txtDCntAName);
    })
</script>
</body>
</html>

